﻿#region Usings
using System;
using System.Web.UI;
using BK.BL;
using BK.Entities;
using Lib.Data.ORM.Entity;
#endregion

namespace BK.WebSite.Controls
{
	public partial class CurrencySelector : UserControl
	{
		
		#region Instance Methods
		protected void Page_Load(object sender, EventArgs e)
		{
			
		}
		#endregion

		#region Instance Properties
		public IdentifierInt CurrencyId
		{
			get { return hfCurrency.Value != string.Empty ? new IdentifierInt(hfCurrency.Value) : null; }
			set
			{
				hfCurrency.Value = value.ToString();
				CurrencyEntity currencyEntity = BlContext.Instance.Currencies.Load(value);
				tbxCurrency.Text = currencyEntity.Name;
			}
		}
		#endregion
	}
}